package net.jeeshop.app.appobject;

import java.io.Serializable;

import net.jeeshop.app.entity.gen.ReturnProductInfo;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;

import com.alibaba.dubbo.common.utils.StringUtils;

/**
 * 应用对象 - ReturnProductInfo.
 *
 * <p>
 * 该类于 2016-08-29 23:44:26 首次生成，后由开发手工维护。
 * </p>
 *
 * @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
 * @version 1.0.0.0, Aug 29, 2016
 */
@JsonSerialize(include = Inclusion.NON_EMPTY)
public final class ReturnProductInfoAO extends ReturnProductInfo implements Serializable {

    /**
     * 默认的序列化 id.
     */
    private static final long serialVersionUID = 1L;
    private String changeProductStatus="";
    
    public String getChangeProductStatus(){
    	String resStr = "";
    	if(this != null && !StringUtils.isBlank(this.getFlag())){
    		switch(this.getFlag()){
	    		case "1":
	    			resStr = "等待卖家同意换货";
	    			break;
	    		case "2":
	    			resStr = "卖家同意换货，等待买家退货";
	    			break;
	    		case "3":
	    			resStr = "商品已寄回，等待卖家收到退货";
	    			break;
	    		case "4":
	    			resStr = "卖家已收到货，等待寄出新货";
	    			break;
	    		case "5":
	    			resStr = "卖家已发新货";
	    			break;
	    		case "6":
	    			resStr = "买家已收到新货，交易完成";
	    			break;
	    		case "7":
	    			resStr = "卖家拒绝退货";
	    			break;
	    		case "0":
	    			resStr = null;
	    			break;
	    	}
    	}
    	
    	return resStr;
    }
    public void setChangeProductStatus(String changeProductStatus){
    	
    	this.changeProductStatus = changeProductStatus;
    	
    }
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
    }
    
}
